#include <stdio.h>
#include <stdlib.h>

int g_unval;
int g_val=100;

int main(int argc,char* argv[],char* env[])
{
    //static int n=10;
    const char* str="hello";
    printf("read only string addr: %p\n",str);
    printf("code addr: %p\n",main);
    printf("init gloval addr: %p\n",&g_val);
    printf("uninit gloval addr: %p\n",&g_unval);

    char *heap_mem=(char*)malloc(10);
    char *heap_mem1=(char*)malloc(10);
    char *heap_mem2=(char*)malloc(10);
    char *heap_mem3=(char*)malloc(10);

    //printf("test heap n: %p\n",&n);
    printf("heap addr: %p\n",heap_mem);
    printf("heap addr: %p\n",heap_mem1);
    printf("heap addr: %p\n",heap_mem2);
    printf("heap addr: %p\n",heap_mem3);

    printf("stack addr: %p\n",&heap_mem);
    printf("stack addr: %p\n",&heap_mem1);
    printf("stack addr: %p\n",&heap_mem2);
    printf("stack addr: %p\n",&heap_mem3);

   // for(int i=0;i<argc;i++)
   // {
   //     printf("argv[%d]: %p\n",i,argv[i]);
   // }
   // for(int i=0;env[i];i++)
   // {
   //     printf("env[%d]: %p\n",i,env[i]);
   // }
    return 0;
}
